// 关于客户的所有接口
import axiosp from '@/apis/axios/indexp.js'
const baseUrl = `/erp`

// 客户列表信息
export function getlist(params) {
	return axiosp.request({
		url: `${baseUrl}/customer/listPage`,
		method: 'post',
		data: params
	})
}

// 根据id查询客户列表
export function getVoDataById(params) {
	return axiosp.request({
		url: `${baseUrl}/customer/getVoDataById`,
		method: 'post',
		data: params
	})
}

// 新增客户列表
export function addData(params) {
	return axiosp.request({
		url: `${baseUrl}/customer/addOrUpdateData`,
		method: 'post',
		data: params
	})
}

// 删除客户列表
export function delectData(params) {
	return axiosp.request({
		url: `${baseUrl}/customer/deleteByIds`,
		method: 'post',
		data: params
		// name: "1111222"
		// pid: "1675479784274132992"
	})
}

// 获取客户类别 新加和删除后台不能用
export function getTypeData(params) {
	return axiosp.request({
		url: `${baseUrl}/customerCat/listAllData`,
		method: 'post',
		data: params
		// name: "1111222"
		// pid: "1675479784274132992"
	})
}


// 获取客户门店
export function getMenDianData(params) {
	return axiosp.request({
		url: `${baseUrl}/shop/listOptionsRelationShopHeader`,
		method: 'post',
		data: params
		// name: "1111222"
		// pid: "1675479784274132992"
	})
}

// 获取客户类型 布匹 - 纱线
export function getKeHuTypeData(params) {
	return axiosp.request({
		url: `${baseUrl}/goodSpu/listTypeOptions`,
		method: 'post',
		data: params
		// name: "1111222"
		// pid: "1675479784274132992"
	})
}


// 获取组织性质
export function getOrgTypeOptionsData(params) {
	return axiosp.request({
		url: `${baseUrl}/customer/listOrgTypeOptions`,
		method: 'post',
		data: params
		// {
		//   "keywords": ""
		// }
	})
}

// 获取标签
export function getListOptionsData(params) {
	return axiosp.request({
		url: `${baseUrl}/labelForCustomer/listOptions`,
		method: 'post',
		data: params
		// {
		//   "keywords": ""
		// }
	})
}

// 获取结款方式
export function getSettlementTypeData(params) {
	return axiosp.request({
		url: `${baseUrl}/settlementType/listOptions`,
		method: 'post',
		data: params
		// {
		//   "keywords": ""
		// }
	})
}

// 获取价格模式

export function getCustomerPriceModelData(params) {
	return axiosp.request({
		url: `${baseUrl}/customerPriceModel/listAllData`,
		method: 'post',
		data: params
	})
}
// 新增修改价格模式
export function addOrUpdateList(params) {
	return axiosp.request({
		url: `${baseUrl}/customerPriceModel/addOrUpdateList`,
		method: 'post',
		data: params
	})
}
// 删除价格模式
export function deleteById(params) {
	return axiosp.request({
		url: `${baseUrl}/customerPriceModel/deleteById`,
		method: 'post',
		data: params
	})
}

// 获取标签
export function getlabelForCustomerData(params) {
	return axiosp.request({
		url: `${baseUrl}/labelForCustomer/listAllData`,
		method: 'post',
		data: params
	})
}
//新增标签
export function lableAddOrUpdateList(params) {
	return axiosp.request({
		url: `${baseUrl}/labelForCustomer/addOrUpdateList`,
		method: 'post',
		data: params
	})
}
//删除标签
export function lableDeleteById(params) {
	return axiosp.request({
		url: `${baseUrl}/labelForCustomer/deleteById`,
		method: 'post',
		data: params
	})
}


// 做货类型
export function getCustomerGoodsTypeData(params) {
	return axiosp.request({
		url: `${baseUrl}/customerGoodsType/listAllData`,
		method: 'post',
		data: params
	})
}
// 新增做货类型
export function addCustomerGoods(params) {
	return axiosp.request({
		url: `${baseUrl}/customerGoodsType/addOrUpdateList`,
		method: 'post',
		data: params
	})
}
// 删除做货类型
export function customerGoodsTypeDeleteById(params) {
	return axiosp.request({
		url: `${baseUrl}/customerGoodsType/deleteById`,
		method: 'post',
		data: params
	})
}
// 获取基本类型
export function initAddData(params) {
	return axiosp.request({
		url: `${baseUrl}/customer/initAddData`,
		method: 'post',
		data: params
	})
}

